package com.模板方法模式.流程模板;

import java.util.Scanner;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/7/7 10:33
 * @description:
 * @version:
 */
public class Rect extends AbsShape{
    double width,height;
    @Override
    public void input() {
        System.out.println("请输入宽和高：");
        Scanner s = new Scanner(System.in);
        width = s.nextDouble();
        height = s.nextDouble();
    }

    @Override
    public double getArea() {
        return width * height;
    }
}